package com.carpedil.boot.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/** @author Administrator */
@RestController
public class HelloController {

  @GetMapping("/login/{code}")
  public String login(@PathVariable("code") Integer code) throws InterruptedException {
    Thread.sleep(1000);
    String str = "";
    switch (code) {
      case 1:
        str = "hello one";
        break;
      case 2:
        str = "hello two";
        break;
      default:
        break;
    }
    return str;
  }
}
